<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>鼠标事件</title>
		<style>
			p {
				background-color: aquamarine;
				cursor: pointer;
			}
		</style>
	</head>
	<body>
		<!-- 鼠标点击事件 -->
		<button onclick="console.log('click')">click事件</button>
		<!-- 鼠标的双击事件 -->
		<p ondblclick="console.log('dblclick')">dblclick事件</p>
		<!-- 鼠标按下去不会触发，弹上来的时候才会触发 -->
		<p onmouseup="console.log('mouseup')">
			mouse事件
		</p>
		<!-- 定义一个div，设置宽高，
		鼠标移上去改变背景颜色，鼠标移出来改变背景颜色 -->
		<!-- this指代当前元素对象 -->
		<div style="width: 200px; height: 200px;"
		onmouseover="this.style.backgroundColor='red'" 
		onmouseout="this.style.backgroundColor='white'">
			123
		</div>
	</body>
</html>